package factory.abstracts;


/**
 * @description: 抽象工厂模式：提供一个创建一系列相差或者相互依赖对象的接口，
 *               而无需指定他们具体的类
 * @author: Fesine
 * @createTime:2016/8/8 19:47
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/8/8 19:47
 */
public class Main {
    public static void main(String[] args) {
        IGFFactory yunNanGFFactory = new YunNanGFFactory();
        BaseGF yunNanGF = yunNanGFFactory.createGF();
        yunNanGF.eatFood();
        yunNanGF.shopping();

        IGFFather father = yunNanGFFactory.createGFFather();
        father.suggestionToGirl();

        IFactory catFactory = new CatFactory();
        Animal cat = catFactory.createAnimal();
        cat.sayHello();
        cat.sound();
        IPerson person = catFactory.createPerson();
        person.pickUp();

        IFactory dogFactory = new DogFactory();
        Animal dog = dogFactory.createAnimal();
        dog.sayHello();
        dog.sound();
        IPerson dogPerson = dogFactory.createPerson();
        dogPerson.pickUp();

    }
}
